]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Use deepUnpack() intead of deep_unpack()
authorAlessandro Bono <alessandro.bono369@gmail.com>
Wed, 10 Aug 2022 09:56:14 +0000 (11:56 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 10 Aug 2022 10:29:24 +0000 (10:29 +0000)
deep_unpack() is just a backwards compability alias for deepUnpack()[1].
The new name makes it more clear that this is not a C function, start to
use it.

[1] https://gitlab.gnome.org/GNOME/gjs/-/commit/13e662a29dbc762d5f4245c504f1e058788b516e

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2416>

15 files changed:
js/dbusServices/screencast/screencastService.js
js/gdm/util.js
js/misc/loginManager.js
js/misc/modemManager.js
js/misc/weather.js
js/ui/accessDialog.js
js/ui/dateMenu.js
js/ui/mpris.js
js/ui/notificationDaemon.js
js/ui/osdMonitorLabeler.js
js/ui/remoteSearch.js
js/ui/shellDBus.js
js/ui/status/keyboard.js
js/ui/status/rfkill.js
tests/interactive/gapplication.js

index 6f348c9d9c2e8ebe6e33ae9a7a560b20af0c0f57..75ffba7c211e0005c00710c05db01661f85a2629 100644 (file)
@@ -76,7 +76,7 @@ var Recorder = class {
 
     _applyOptions(options) {
         for (const option in options)
-            options[option] = options[option].deep_unpack();
+            options[option] = options[option].deepUnpack();
 
         if (options['pipeline'] !== undefined)
             this._pipelineString = options['pipeline'];
index 22cbe473398f21d2fddf57f827c3c5c29071ab2f..43647e7ac959e57ec00dabf64e32c965f2d97294 100644 (file)
@@ -587,7 +587,7 @@ var ShellUserVerifier = class extends Signals.EventEmitter {
         if (!this.serviceIsForeground(serviceName))
             return;
 
-        this.emit('show-choice-list', serviceName, promptMessage, list.deep_unpack());
+        this.emit('show-choice-list', serviceName, promptMessage, list.deepUnpack());
     }
 
     _onInfo(client, serviceName, info) {
index fb61d64cb5f3a8079109cde565c9ca1701b63cbc..6549fe5adc31f086d5eb964b0d088d788114bbd4 100644 (file)
@@ -42,7 +42,7 @@ function canLock() {
                                                Gio.DBusCallFlags.NONE,
                                                -1, null);
 
-        let version = result.deep_unpack()[0].deep_unpack();
+        let version = result.deepUnpack()[0].deepUnpack();
         return haveSystemd() && versionCompare('3.5.91', version);
     } catch (e) {
         return false;
index 0424b77ff9f8d322f8e74be752cc85bdaa2f51ee..3c29795772523d61d01427a89bb8caab2e9e18c9 100644 (file)
@@ -250,14 +250,14 @@ var BroadbandModem = GObject.registerClass({
         this._reloadSignalQuality();
 
         this._proxy_3gpp.connect('g-properties-changed', (proxy, properties) => {
-            let unpacked = properties.deep_unpack();
+            let unpacked = properties.deepUnpack();
             if ('OperatorName' in unpacked || 'OperatorCode' in unpacked)
                 this._reload3gppOperatorName();
         });
         this._reload3gppOperatorName();
 
         this._proxy_cdma.connect('g-properties-changed', (proxy, properties) => {
-            let unpacked = properties.deep_unpack();
+            let unpacked = properties.deepUnpack();
             if ('Nid' in unpacked || 'Sid' in unpacked)
                 this._reloadCdmaOperatorName();
         });
index 3f05f21fe1bb3465ab6c36b26616b07310fb505d..a01b832b8fbba6b1807a98c1d35c8edfd642e273 100644 (file)
@@ -294,7 +294,7 @@ var WeatherClient = class extends Signals.EventEmitter {
     }
 
     _onLocationsChanged() {
-        let locations = this._settings.get_value('locations').deep_unpack();
+        let locations = this._settings.get_value('locations').deepUnpack();
         let serialized = locations.shift();
         let mostRecentLocation = null;
 
index a162d650167b1216e0955538ce6e3fcdf7007e10..8788e474289ce9ee7d2f11a7a20ec397c1d5cdd1 100644 (file)
@@ -28,7 +28,7 @@ class AccessDialog extends ModalDialog.ModalDialog {
         this._request = Gio.DBusExportedObject.wrapJSObject(RequestIface, this);
 
         for (let option in options)
-            options[option] = options[option].deep_unpack();
+            options[option] = options[option].deepUnpack();
 
         this._buildLayout(title, description, body, options);
     }
index bd363f3232d3851d8bb9ce907620d77f66ed974e..2c44f0c4fb65e2ac08a073bd53e1809888abaa25 100644 (file)
@@ -375,7 +375,7 @@ class WorldClocksSection extends St.Button {
         this._locations = [];
 
         let world = GWeather.Location.get_world();
-        let clocks = this._settings.get_value('locations').deep_unpack();
+        let clocks = this._settings.get_value('locations').deepUnpack();
         for (let i = 0; i < clocks.length; i++) {
             let l = world.deserialize(clocks[i]);
             if (l && l.get_timezone() != null)
index 3ef8ef399da1b64253918807b9616704a4e39ae5..f44f87e92cf19846330a079d5474e5c8ea5847bd 100644 (file)
@@ -187,7 +187,7 @@ var MprisPlayer = class MprisPlayer extends Signals.EventEmitter {
     _updateState() {
         let metadata = {};
         for (let prop in this._playerProxy.Metadata)
-            metadata[prop] = this._playerProxy.Metadata[prop].deep_unpack();
+            metadata[prop] = this._playerProxy.Metadata[prop].deepUnpack();
 
         // Validate according to the spec; some clients send buggy metadata:
         // https://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata
index f5e9cee19ac450ea4d57a6f2341a5d009df7fae3..b27158e4f589c2faf263c7cf9ad43bf8b80c2505 100644 (file)
@@ -130,7 +130,7 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
 
         for (let hint in hints) {
             // unpack the variants
-            hints[hint] = hints[hint].deep_unpack();
+            hints[hint] = hints[hint].deepUnpack();
         }
 
         hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
@@ -488,7 +488,7 @@ class GtkNotificationDaemonNotification extends MessageTray.Notification {
         }
 
         if (buttons) {
-            buttons.deep_unpack().forEach(button => {
+            buttons.deepUnpack().forEach(button => {
                 this.addAction(button.label.unpack(), () => {
                     this._onButtonClicked(button);
                 });
@@ -691,7 +691,7 @@ var GtkNotificationDaemon = class GtkNotificationDaemon {
         try {
             let value = global.get_persistent_state('a(sa(sv))', 'notifications');
             if (value) {
-                let sources = value.deep_unpack();
+                let sources = value.deepUnpack();
                 sources.forEach(([appId, notifications]) => {
                     if (notifications.length == 0)
                         return;
@@ -706,7 +706,7 @@ var GtkNotificationDaemon = class GtkNotificationDaemon {
                     }
 
                     notifications.forEach(([notificationId, notification]) => {
-                        source.addNotification(notificationId, notification.deep_unpack(), false);
+                        source.addNotification(notificationId, notification.deepUnpack(), false);
                     });
                 });
             }
index 540af75ad3cf8aefd27e0c6739caf96e8c4acd8e..07c7d656923279d4e5e037b70511077efe0e8794 100644 (file)
@@ -99,7 +99,7 @@ var OsdMonitorLabeler = class {
             let monitor = this._monitorManager.get_monitor_for_connector(connector);
             if (monitor == -1)
                 continue;
-            this._monitorLabels.get(monitor).push(params[connector].deep_unpack());
+            this._monitorLabels.get(monitor).push(params[connector].deepUnpack());
         }
 
         for (let [monitor, labels] of this._monitorLabels.entries()) {
index ec13be673dfb205e67b437d613af54c2342c3a17..87ee3840a3256ab93caa3c878d30a887af2086d5 100644 (file)
@@ -287,7 +287,7 @@ var RemoteSearchProvider = class {
             for (let prop in metas[i]) {
                 // we can use the serialized icon variant directly
                 if (prop !== 'icon')
-                    metas[i][prop] = metas[i][prop].deep_unpack();
+                    metas[i][prop] = metas[i][prop].deepUnpack();
             }
 
             resultMetas.push({
index edc16eb872b6cf2c16fae52a0596236c063f0d4c..284d92b0b3ee5a163251c9522d44aa18c388b124 100644 (file)
@@ -115,7 +115,7 @@ var GnomeShell = class {
         }
 
         for (let param in params)
-            params[param] = params[param].deep_unpack();
+            params[param] = params[param].deepUnpack();
 
         const {
             connector,
index 7d6d5fdca01e493527e79614a323ab2ca77e9b90..76a42f6bd701f31856ef2064b6f090d5a5e87007 100644 (file)
@@ -211,7 +211,7 @@ var InputSourceSystemSettings = class extends InputSourceSettings {
                 'GetAll',
                 new GLib.Variant('(s)', [this._BUS_IFACE]),
                 null, Gio.DBusCallFlags.NONE, -1, null);
-            [props] = result.deep_unpack();
+            [props] = result.deepUnpack();
         } catch (e) {
             log(`Could not get properties from ${this._BUS_NAME}`);
             return;
@@ -274,7 +274,7 @@ var InputSourceSessionSettings = class extends InputSourceSettings {
         let nSources = sources.n_children();
 
         for (let i = 0; i < nSources; i++) {
-            let [type, id] = sources.get_child_value(i).deep_unpack();
+            let [type, id] = sources.get_child_value(i).deepUnpack();
             sourcesList.push({ type, id });
         }
         return sourcesList;
index 08271c021b8c60d8afaafb993b587adadab82bcb..2e1f98f4d5a35aa4dae50294c632aa8eb6b91403 100644 (file)
@@ -63,7 +63,7 @@ const RfkillManager = GObject.registerClass({
     /* eslint-enable camelcase */
 
     _changed(proxy, properties) {
-        for (const prop in properties.deep_unpack()) {
+        for (const prop in properties.deepUnpack()) {
             switch (prop) {
             case 'AirplaneMode':
                 this.notify('airplane-mode');
index ec38b806f31d17561c271fca108cfc61583a7713..9dd2a408b3f6e1aed4c14e45861b995758ae44a8 100755 (executable)
@@ -13,7 +13,7 @@ function do_action_param(action, parameter) {
 }
 
 function do_action_toggle(action) {
-    action.set_state(GLib.Variant.new('b', !action.state.deep_unpack()));
+    action.set_state(GLib.Variant.new('b', !action.state.deepUnpack()));
     print ("Toggled");
 }